﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BangChietTinh.aspx.cs" Inherits="DLV.BackEnd.Pages.BangChietTinh" EnableEventValidation="false"  %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="DLV.Data.Entities" %>
<%@ Import Namespace="DLV.Library.Utilities" %>

<asp:content id="Content1" contentplaceholderid="placeHolderContent" runat="server">
    <style>
        .report {
            margin-top: 40px;
        }

        .head {
            width: 100%;
            overflow: hidden;
        }

            .head > .logo {
                width: 20%;
                float: left;
                margin-right: 1%;
            }

                .head > .logo img {
                    display: block;
                    margin: 0 auto;
                }

            .head > .table {
                width: 78%;
                float: right;
            }

                .head > .table > table {
                    width: 100%;
                    border-top: 1px solid #000;
                    border-left: 1px solid #000;
                }

                    .head > .table > table th {
                        padding: 10px 0;
                        font-size: 20px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                        background-color: #F2DCDB;
                    }

                    .head > .table > table td {
                        padding: 7px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                    }

        .service {
            width: 100%;
            margin-top: 20px;
        }

            .service > table {
                width: 100%;
                margin-bottom: 20px;
                border-top: 1px solid #000;
                border-left: 1px solid #000;
            }

                .service > table th {
                    padding: 5px 0;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                    background-color: #F2DCDB;
                }

                    .service > table th.first {
                        background-color: #92CDDC;
                        width: 8%;
                    }

                .service > table td {
                    padding: 7px;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                }

                .service > table .tr {
                    text-align: right;
                }

        div {
            margin: 0;
            padding: 0;
        }
    </style>
    
    <div class="report">
        <div class="head">
            <div class="logo">
                <a href="http://dulichviet.com.vn"><img src="/images/logo.png" /></a>
            </div>    
            <div class="table">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th colspan="4">BẢNG TÍNH GIÁ</th>
                    </tr>
                    <tr>
                        <td><b>Tên đoàn</b></td>
                        <td><%=tourInfo.TourName %></td>
                        <td><b>Code đoàn</b></td>
                        <td>DLV<%=tourInfo.TourId %></td>
                    </tr>
                    <tr>
                        <td><b>Loại hình đoàn</b></td>
                        <td><%=tourInfo.GroupType %></td>
                        <td><b>Loại tour</b></td>
                        <td><%=tourInfo.TourTypeId %></td>
                    </tr>
                    <tr>
                        <td><b>Điểm khởi hành</b></td>
                        <td><%=tourInfo.LocationBegin %></td>
                        <td><b>Hành trình</b></td>
                        <td><%=tourInfo.ScheduleId %></td>
                    </tr>
                    <tr>
                        <td><b>Số lượng khách</b></td>
                        <td class="edit-tourItem">
                            Người lớn:
                            <asp:Label class="lbTour" ID="lbQuantityAdultsTour" runat="server"></asp:Label> 
                            <asp:TextBox  id="txtQuantityAdultsTour" runat="server" Width="50px"></asp:TextBox>
                            |
                            Trẻ em:
                            <asp:Label class="lbTour" ID="lbQuantityChildTour" runat="server"></asp:Label>
                            <asp:TextBox  id="txtQuantityChildTour" runat="server" Width="50px"></asp:TextBox>
                        </td>
                        <td class="display-tourItem">Người lớn: <%=tourInfo.QuantityAdult %> | Trẻ em: <%=tourInfo.QuantityChild %></td>
                        <td><b>Đối tượng khách</b></td>
                        <td>Chọn đối tượng khách</td>
                    </tr>
                    <tr>
                        <td><b>Số hướng dẫn viên</b></td>
                        <td>Chọn số</td>
                        <td><b>Yêu cầu</b></td>
                        <td>Chọn loại HDV</td>
                    </tr>
                    <tr>
                        <td><b>Ngày khởi hành</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbBeginDateTour" runat="server"></asp:Label>
                          <%--  <input class="ctTour" type="text" id="dteBeginDateTour" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />--%>
                           <%-- <asp:DropDownList class="ctTour" ID="ddlBeginHourTour" runat="server" Width="55px"></asp:DropDownList>
                            <asp:DropDownList class="ctTour" ID="ddlBeginMinuteTour" runat="server" Width="55px"></asp:DropDownList>--%>
                        </td>
                        <td><b>Ngày kết thúc</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbEndDateTour" runat="server"></asp:Label>
                            <%--<input class="ctTour" type="text" id="dteEndDateTour" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />
                            <asp:DropDownList class="ctTour" ID="ddlEndHourTour" runat="server" Width="55px"></asp:DropDownList>
                            <asp:DropDownList class="ctTour" ID="ddlEndMinuteTour" runat="server" Width="55px"></asp:DropDownList>--%>
                        </td>
                    </tr>
                    <tr>
                        <td><b>Tổng số ngày</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbTotalDayTour" runat="server"></asp:Label> 
                           <%-- <asp:TextBox class="ctTour" id="txtTotalDayTour" runat="server" Width="50px" ></asp:TextBox>--%>
                        </td>
                        <td><b>Tổng số đêm</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbTotalNightTour" runat="server"></asp:Label> 
                           <%-- <asp:TextBox class="ctTour" id="txtTotalNightTour" runat="server" Width="50px" ></asp:TextBox>--%>
                        </td>
                    </tr>
                     <tr>
                        <td><b>Mùa</b></td>
                        <td><%=tourInfo.Season %></td>
                        <td><b>Thị trường</b></td>
                        <td><%=tourInfo.MartName %></td>
                    </tr>
                </table>
                
                <input  id="btnUpdateTour" type="button" value="Cap nhat" onclick="$('.edit-tourItem').show(); $('.display-tourItem').hide()"/>
               
                <asp:LinkButton class="ctTour" ID="lbtSave" runat="server" Text="" onclick="lbtSave_Click" CssClass="toolbar">
					<input class="ctTour" id="btnSaveTour" type="button" value="Luu"  onclick="$('.edit-tourItem').hide()" />
                    </asp:LinkButton>
						 
				<asp:LinkButton class="ctTour" ID="lbtClose" runat="server" Text="" onclick="lbtClose_Click" 
                    CssClass="toolbar" CausesValidation="False">
					<input class="ctTour" id="btnCloseTour" type="button" value="Huy" />
				</asp:LinkButton>
						    

            </div>
        </div>
        
       
        <div class="service">
            <%--Máy bay-----------------------------------------------------------------------------------------------%>
            <table cellpadding="0" cellspacing="0" border="0" id="table-air">
                
                <tr>
                    <th rowspan="2" class="first">VÉ MÁY BAY</th>
                    <th rowspan="2">HÀNH TRÌNH</th>
                    <th rowspan="2">NGÀY ĐI</th>
                    <th rowspan="2">LƯỢT BAY</th>
                    <th rowspan="2">HÃNG HK</th>
                    <th rowspan="2">Vé</th>
                    <th colspan="2">GIÁ VÉ</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG CHI PHÍ</th>
                    
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th>
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                </tr>
                
                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInfo in TicketAirs)
                   { %>
                <tr class="ListAir" id="ticket-air-<%=calculatorInfo.CalculatorId %>">
                    <td></td>
                    <td ><%=calculatorInfo.ScheduleName %></td>
                    <td ><%=calculatorInfo.DateBegin %></td>
                    <td ><%=calculatorInfo.FlightArrivals %></td>
                    <td ><%=calculatorInfo.ConcernFullName %></td>
                    <td ><%=calculatorInfo.TicketName %></td>
                    <td ><%=calculatorInfo.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td ><%=calculatorInfo.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfo.Vat %></td>
                    <td ><%= calculatorInfo.TotalPriceAir.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    
                    <td><%--<input class="edit" itemid="<%=priceItemInfo.PriceItemId %>" type="button" onclick="openPopup('ticket-air')" value="Sửa" />--%></td>
                    <td>
                        <input class="btnUpdateAir"  type="button" value="Cập nhật" calculatorid="<%=calculatorInfo.CalculatorId %>" />
                        <input class="btnDeleteAir"  type="button" value="Xóa" calculatorid="<%=calculatorInfo.CalculatorId %>" />
                    </td>
                </tr>
                <% } %>
                    <tr></tr>
                
                <tr id="new-ticket-ari">
                    <td></td>
                    <td ><asp:DropDownList ID="ddlSchedule" runat="server" Width="100px"></asp:DropDownList></td>
                    <td >
                        <input type="text" id="dteGoDateAri" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />
                    </td>
                    <td ><asp:DropDownList ID="ddlFlightArrivals" runat="server" Width="100px"></asp:DropDownList></td>
                    <td ><asp:DropDownList ID="ddlConcern" runat="server" Width="100px"></asp:DropDownList></td>
                    <td><asp:DropDownList ID="ddlTicKetAri" runat="server" Width="100px"></asp:DropDownList></td>
                    <td ><asp:TextBox id="txtPriceAdultAri" runat="server" Width="50px"></asp:TextBox></td>
                    <td ><asp:TextBox id="txtPriceChildAri" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:TextBox id="txtVatAir" runat="server" Width="100px"></asp:TextBox></td>
                    <td ><asp:TextBox id="txtTotalPriceAri" runat="server" Width="100px"></asp:TextBox></td>
                    
                    <td></td>
                    <td id="toolbar-save" class="button">
						 <input  id="btnInsertAir" type="button" value="Thêm" calculatorid="-1"/>
                        <input id="btnDeleteAir" class="btnDeleteAir"  type="button" value="hủy" calculatorid="-1" />
					</td>
                </tr>
                <tr>
                    
                    <td colspan="9"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalTicketAirPrices"><%=TotalTicketAirPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    
                    <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalTicketAirPricesAdults"><%=TotalTicketAirPricesAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    
                    <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id="TotalTicketAirPricesChild"><%=TotalTicketAirPricesChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td></td>
                </tr>
            </table>
             <%--TÀU HỎA--%>
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2" class="first">TÀU </th>
                    <th rowspan="2">HÀNH TRÌNH</th>
                    <th rowspan="2">NGÀY ĐI</th>
                    <th rowspan="2">LƯỢT ĐI</th>
                    <th rowspan="2">NHÀ CUNG CẤP</th>
                    <th rowspan="2">VÉ</th>
                    <th colspan="2">GIÁ/HẠNG VÉ/KHOANG</th>
                    <th colspan="2">SỐ KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG CHI PHÍ</th>
                    
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th>
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                </tr>
                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInfo in TicketStations)
                   { %>
                <tr class="ListStation" id="ticket-station-<%=calculatorInfo.CalculatorId %>">
                    <td></td>
                    <td><%=calculatorInfo.ScheduleName %></td>
                    <td><%=calculatorInfo.DateBegin %></td>
                    <td class="col-ticket-type"><%=calculatorInfo.FlightArrivals %></td>
                    <td><%=calculatorInfo.ConcernFullName %></td>
                    <td class="col-ticket"><%=calculatorInfo.TicketName %></td>
                     <td class="tr col-adults"><%=calculatorInfo.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td class="tr col-child"><%=calculatorInfo.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfo.QuantityAdults %></td>
                    <td class="col-ticket"><%=calculatorInfo.QuantityChild %></td>
                    <td><%=calculatorInfo.Vat %></td>
                    <td class="tr"><%=calculatorInfo.TotalPriceStation.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    
                    <td></td>
                    <td>
                        <input class="btnUpdateStation"  type="button" value="Cập nhật" calculatorid="<%=calculatorInfo.CalculatorId %>" />
                        <input class="btnDeleteStation"  type="button" value="Xóa" calculatorid="<%=calculatorInfo.CalculatorId %>" />
                    </td>
                </tr>
                
                <%} %>
                <tr></tr>
                 <tr id="new-ticket-station">
                    <td></td>
                    <td> <asp:DropDownList ID="ddlScheduleStation" runat="server" Width="100px"></asp:DropDownList></td>
                    <td ><input type="text" id="dteGoDateStation" placeholder="Click để chọn ngày" readonly="readonly" runat="server" /></td>
                    <td ><asp:DropDownList ID="ddlFlightArrivalsStation" runat="server" Width="100px"></asp:DropDownList></td>
                    <td ><asp:DropDownList ID="ddlConcernStation" runat="server" Width="100px"></asp:DropDownList></td>
                    <td ><asp:DropDownList ID="ddlTicketStation" runat="server" Width="100px"></asp:DropDownList></td>
                    <td ><asp:TextBox id="txtPriceAdultsStation" runat="server" Width="50px"></asp:TextBox></td>
                    <td ><asp:TextBox id="txtPriceChildStation" runat="server" Width="50px"></asp:TextBox></td>
                    <td ><asp:TextBox id="txtQuantityAdultsStation" runat="server" Width="50px"></asp:TextBox></td>
                    <td ><asp:TextBox id="txtQuantityChildStation" runat="server" Width="50px"></asp:TextBox></td>
                     <td><asp:TextBox id="txtVatStation" runat="server" Width="100px"></asp:TextBox></td>
                    <td ><asp:TextBox id="txtTotalPriceStation" runat="server" Width="100px"></asp:TextBox></td>
                    
                    <td></td>
                    <td  class="button">
						 <input  id="btnInsertStation" type="button" value="Thêm" calculatorid="-1"/>
                        <input id="btnDeleteStation" class="btnDeleteStation"  type="button" value="hủy" calculatorid="-1" />
					</td>
                </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalTicketStationPrices"><%=TotalTicketStationPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr"><%=TotalTicketStationPricesAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                </tr>
                <tr>
                     <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr"><%=TotalTicketStationPricesChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                </tr>
 
        </table>
            <%--Xe-----------------------------------------------------------------------------------------------%>
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th class="first">XE</th>
                    <th>HÀNH TRÌNH</th>
                    <th>NGÀY SD<br/> DỊCH VỤ</th>
                    <th>SỐ CHỖ/XE</th>
                    <th>HÃNG SẢN XUẤT</th>
                    <th>NĂM SẢN XUẤT</th>
                    <th>GIÁ</th>
                    <th>SỐ LƯỢNG<br/> XE</th>
                    <th>VAT</th>
                    <th>TỔNG CHI PHÍ</th>
                    <th>GHI CHÚ</th>
                    <th></th>
                </tr>

                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorCar in TicketCars) { %>
                <tr class="ListCar" id="ticket-car-<%=calculatorCar.CalculatorId %>">

                    <td></td>
                    <td><%=calculatorCar.ScheduleName %></td>
                    <td><%=calculatorCar.DateBegin %></td>
                    
                    <td class="tr"><%=calculatorCar.Time %></td>
                    <td class="tr"><%=calculatorCar.ConcernFullName  %></td>
                    <td class="tr"><%=calculatorCar.TicketType %></td>
                    <td class="tr"><%=calculatorCar.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td class="tr"><%=calculatorCar.QuantityCar %></td>
                    <td><%=calculatorCar.Vat %></td>
                    <td class="tr"><%=((double.Parse(calculatorCar.PriceAdults.ToString()) * double.Parse(calculatorCar.QuantityCar.ToString())) + (double.Parse(calculatorCar.PriceAdults.ToString()) * double.Parse(calculatorCar.QuantityCar.ToString())) * (calculatorCar.Vat / 100)).ToString("#,###", new CultureInfo("vi-VN")) %></td>

                    <td></td>
                    <td>
                        <input class="btnUpdateCar"  type="button" value="Cập nhật" calculatorid="<%=calculatorCar.CalculatorId %>" />
                        <input class="btnDeleteCar"  type="button" value="Xóa" calculatorid="<%=calculatorCar.CalculatorId %>" />
                    </td>
                </tr>
                <% } %>
                <tr id="new-ticket-car">
                    <td></td>

                   

                    <td><asp:DropDownList ID="ddlScheduleCar" runat="server" Width="100px"></asp:DropDownList></td>
                    <td><input type="text" id="dteGoDateCar" placeholder="Click để chọn ngày" readonly="readonly" runat="server" /></td>
                    
                    <td class="tr"><asp:DropDownList ID="ddlSoChoCar" runat="server" Width="100px"></asp:DropDownList></td>
                    <td class="tr"><asp:DropDownList ID="ddlConcernCar" runat="server" Width="100px"></asp:DropDownList></td>
                    <td class="tr"><asp:DropDownList ID="ddlYearCar" runat="server" Width="100px"></asp:DropDownList></td>
                    <td class="tr"><asp:TextBox id="txtPriceCar" runat="server" Width="100px"></asp:TextBox></td>
                    <td class="tr"><asp:TextBox id="txtQuantityCar" runat="server" Width="100px"></asp:TextBox></td>
                    <td><asp:TextBox id="txtVatCar" runat="server" Width="100px"></asp:TextBox></td>
                    <td class="tr"><asp:TextBox id="txtTotalPriceCar" runat="server" Width="100px"></asp:TextBox></td>

                    

                    <td></td>
                    <td>
                        <input  id="btnInsertCar" type="button" value="Thêm" calculatorid="-1" priceid="-1"/>
                        <input id="btnDeleteCar" class="btnDeleteCar"  type="button" value="hủy" calculatorid="-1" />
                    </td>
                </tr>
                <tr>
                    <td colspan="9"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalTicketCarPrices"><%=TotalTicketCarPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalTicketCarPricesAdults"><%=TotalTicketCarPricesAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id="TotalTicketCarPricesChild"><%=TotalTicketCarPricesChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td></td>
                </tr>
            </table> 
            
        </div>
                    
    </div>
    
    

    

<%--    <link href="/css/popup.css" rel="stylesheet" />
    <script src="/js/jquery.popup.js"></script>
    <div class="popup-wrapper"></div>
    <div class="popup-main popup-ticket-air">
        <div class="popup-content">
            <div class="popup-close icon-close" onclick="closePopup('ticket-air')"></div>
             <div id="toolbar" class="toolbar">
			    <table class="toolbar">
			        <tbody>
					    <tr>
						    <td id="toolbar-save" class="button">
						        <asp:LinkButton ID="lbtSave" runat="server" Text="" onclick="lbtSave_Click" CssClass="toolbar">
					                <span id="Span1" title="Save" class="icon-32-save" runat="server"></span>Lưu
					            </asp:LinkButton>
						    </td>
						    <td id="toolbar-cancel" class="button">
						        <asp:LinkButton ID="lbtClose" runat="server" Text="" onclick="lbtClose_Click" 
                                    CssClass="toolbar" CausesValidation="False">
					                <span id="Span2" title="Close" class="icon-32-cancel" runat="server"></span>Thoát
					            </asp:LinkButton>
						    </td>
					    </tr>
				    </tbody>
			    </table>
		    </div>
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <script type="text/javascript">
                        $(document).ready(function () {
                            var replaceCharacter = function(character) {
                                return character.replace('>', '&gt;');
                            };
                            var replaceDot = function(value) {
                                for (var i = 0; i < 5; i++)
                                    value = value.replace('.', '');
                                return value;
                            };
                            var selectedOption = function(element, text) {
                                $(element).each(function () {
                                    if (replaceCharacter($(this).text()) == text)
                                        $(this).attr('selected', 'selected');
                                });
                            };
                            var setValueElement = function(element, value) {
                                $(element).val(value);
                            };
                            $('.edit').click(function() {
                                var itemId = $(this).attr('itemid');
                                var element = $('#ticket-air-' + itemId);
                                var scheduleName = element.find('.col-schedule-name').html();
                                var goDate = element.find('.col-go-date').html();
                                var ticketType = element.find('.col-ticket-type').html();
                                var name = element.find('.col-name').html();
                                var priceAdults = replaceDot(element.find('.col-adults').html());
                                var priceChild =replaceDot(element.find('.col-child').html());

                                selectedOption('.ticket-air #<%=ddlSchedule.ClientID %> option', scheduleName);
                                selectedOption('.ticket-air #ddlTicketType option', ticketType);
                                setValueElement('.ticket-air #txtPriceAdults', priceAdults);
                                setValueElement('.ticket-air #txtPriceChild', priceChild);
                                setValueElement('.ticket-air #dteGoDate', goDate);
                                selectedOption('.ticket-air #ddlConcern option', name);
                            });
                        });
                    </script>

                    <table class="adminform ticket-air">
                        
                        <tr>
                            <td>Lịch trình</td>
                            <td>
                                <asp:DropDownList ID="ddlSchedule" runat="server" Width="413px"></asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Loại vé:
                            </td>
                            <td>
                                <select id="ddlTicketType">
                                    <option value="-1">--- Chọn loại vé ---</option>
                                    <option value="2">Một chiều</option>
                                    <option value="1">Khứ hồi</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Hãng hàng không</td>
                            <td>
                                <select id="ddlConcern">
                                    <option value="-1">--- Chọn hãng hàng không ---</option>
                                    <option value="2">Vietjet</option>
                                    <option value="1">VNA</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Giá người lớn</td>
                            <td>
                                <input id="txtPriceAdults" class="validate-number" style="width: 185px" />
                            </td>
                        </tr>
                        <tr>
                            <td>Giá trẻ em</td>
                            <td>
                                <input id="txtPriceChild" class="validate-number" style="width: 185px" />
                            </td>
                        </tr>
                    
                         <tr>
                            <td>Ngày đi:</td>
                            <td>
                                <input type="text" id="dteGoDate" placeholder="Click để chọn ngày" readonly="readonly" />
                            </td>
                        </tr>  
                        <tr>
                            <td colspan="2">
                                <input id="btnSubmitTicketAir" type="button" value="Save" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>  
    <link rel="stylesheet" href="/css/datepicker/jquery.ui.all.css" />
	<script type="text/javascript" src="/js/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="/js/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
	    $(function () {
	        $("#dteGoDate").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	    });
	</script>--%>
    <script src="../js/jquery.ChietTinhTour.js"></script>
    <script src="/js/jquery.ChietTinh.js"></script>
    <script src="/js/jquery.ChietTinhCar.js"></script>
    <script src="/js/jquery.ChietTinhStation.js"></script>
    <script src="/js/jquery.price.js"></script>
    <script src="/js/jquery.address.js"></script>
    <script src="../js/jquery.ChietTinhEating.js"></script>
    <script src="../js/jquery.ChietTinhVisa.js"></script>
    <script src="../js/jquery.ChietTinhDichVuKhac.js"></script>
    <script src="../js/jquery.ChietTinhHoaHong.js"></script>
    <script src="../js/jquery.location.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //CalculatorTour(<%--'#<%=txtQuantityAdultsTour.ClientID%>', '#<%=txtQuantityChildTour.ClientID%>', '#<%=dteBeginDateTour.ClientID%>', '#<%=ddlBeginHourTour.ClientID%>', '#<%=ddlBeginMinuteTour.ClientID%>', '#<%=dteEndDateTour.ClientID%>', '#<%=ddlEndHourTour.ClientID%>', '#<%=ddlEndMinuteTour.ClientID%>', '#<%=txtTotalDayTour.ClientID%>', '#<%=txtTotalNightTour.ClientID%>', '<%=tourInfo.QuantityAdult%>', '<%=tourInfo.QuantityChild%>', '<%=tourInfo.BeginDate.ToShortDateString()%>', '<%=tourInfo.BeginDate.Hour%>', '<%=tourInfo.BeginDate.Minute%>', '<%=tourInfo.EndDate.ToShortDateString()%>', '<%=tourInfo.EndDate.Hour%>', '<%=tourInfo.EndDate.Minute%>', '<%=tourInfo.QuantityDay%>', '<%=tourInfo.QuantityNight%>'--%>);
            $('#btnDeleteAir').hide();
            $('#btnDeleteCar').hide();
            $('.edit-tourItem').hide();
        
            CalculatorAir('#<%= txtTotalPriceAri.ClientID%>', '#<%= ddlSchedule.ClientID%>', '#<%= ddlFlightArrivals.ClientID%>', '#<%= ddlConcern.ClientID%>', '<%= tourInfo.TourId %>', '#<%=ddlTicKetAri.ClientID%>', '#<%=txtPriceAdultAri.ClientID%>', '#<%=txtPriceChildAri.ClientID%>', '#<%=dteGoDateAri.ClientID%>', '<%= tourInfo.QuantityAdult%>', '<%= tourInfo.QuantityChild%>','#<%=txtVatAir.ClientID%>', '<%= tourInfo.Season%>');

            CalculatorCar('#<%= ddlScheduleCar.ClientID%>', '#<%= dteGoDateCar.ClientID%>', '#<%= txtQuantityCar.ClientID%>', '#<%= ddlSoChoCar.ClientID%>', '#<%= ddlConcernCar.ClientID%>', '#<%= ddlYearCar.ClientID%>', '#<%= txtPriceCar.ClientID%>', '#<%= txtTotalPriceCar.ClientID%>', '<%= tourInfo.Season%>', '<%= tourInfo.TourId%>', '#<%=txtVatCar.ClientID%>','<%=tourInfo.QuantityAdult%>','<%=tourInfo.QuantityChild%>');


       
            CalculatorStation('#<%= txtTotalPriceStation.ClientID%>', '#<%= ddlScheduleStation.ClientID%>', '#<%= ddlFlightArrivalsStation.ClientID%>', '#<%= ddlConcernStation.ClientID%>', '<%= tourInfo.TourId %>', '#<%=ddlTicketStation.ClientID%>', '#<%=txtPriceAdultsStation.ClientID%>', '#<%=txtPriceChildStation.ClientID%>', '#<%=dteGoDateStation.ClientID%>', '#<%=txtVatStation.ClientID%>', '<%= tourInfo.Season%>', '#<%= txtQuantityAdultsStation.ClientID%>', '#<%= txtQuantityChildStation.ClientID%>');
        });
    </script>
    <link rel="stylesheet" href="/css/datepicker/jquery.ui.all.css" />
	<script type="text/javascript" src="/js/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="/js/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
	    $(function () {
	        $("#<%= dteGoDateAri.ClientID %>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });


	        $("#<%= dteGoDateStation.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteGoDateCar.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	       
	    });
	</script>

    
</asp:content>
